package com.bite.springioc.Component;

import com.bite.springioc.Model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class UserInfoComponent {

    @Bean
    public UserInfo sayHi(){
        UserInfo user = new UserInfo();
        user.setId(3);
        user.setName("zhangsan");
        return user;
    }

    @Bean
    public UserInfo userInfo(){
        UserInfo user = new UserInfo();
        user.setId(4);
        user.setName("lisi");
        return user;
    }
}
